<%@ page import="entity.User" %><%--
  Created by IntelliJ IDEA.
  User: 云哥
  Date: 2023/6/2
  Time: 12:11
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
<html>
<head>
    <title>JSTL-set</title>
</head>
<body>
<c:set var="userName" scope="session" value="张三丰"></c:set>
<c:set var="fullName" scope="request" value="周芷若"></c:set>
<h1>欢迎${sessionScope.userName}登录成功！</h1>
<hr>
<h1>欢迎${requestScope.fullName}登录成功！</h1>
<hr>
<%--<c:set var="user"  value="${requestScope.loginUser}"  property="fullName" scope="request"></c:set>--%>
<%--<c:out value="${user.fullName}"></c:out>--%>

<%
    User user = new User(10086, "奥德飙", "aoDeBiao", '男');
    request.setAttribute("loginUser", user);
%>

<c:out value="${requestScope.loginUser}"></c:out>
<c:set var="myUser" target="${requestScope.loginUser}" property="fullName" value="张无忌"></c:set>
<c:out value="${requestScope.loginUser}"></c:out>
<br>
<c:out value="${myUser}"></c:out>
<hr>

</body>
</html>
